home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 16
/
AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso
/
pd
/
anwendungen
/
filer
/
rexx
/
searchtext.filer
< prev
next >
Wrap
Text File
|
1997-12-08
|
1KB
|
65 lines
/*
$VER: Searchtext.filer 1.1 (1997-12-08)
Author:
Jon Åslund <jooon@hem1.passagen.se>
Function:
Opens a string requester, asks for a pattern to search for in the selected
files and then executes the command.
History:
1.0 - Used Execute.filer as a template
1.1 - Changed Example for "Filer.RC"
Call from Filer:
Searchtext
Example for "Filer.RC":
BUTTON ...,...,"Search Text","Searchtext"
*/
OPTIONS RESULTS
'STATUS Searching for text'
PANEL OFF
Pattern=GETCLIP('FILER_SEARCH')
'SETSTRING' Pattern
GETSTRING 'Enter pattern to search for:'
IF RESULT="RESULT" THEN
DO
PANEL ON
'STATUS Searching aborted'
EXIT 5
END
Pattern = RESULT
GETNUMENTRIES
Num=RESULT
DO Index=1 TO Num
GETNAME Index
Data=RESULT
Name=SUBSTR(Data,2)
IF LEFT(Data,1)="f" THEN DO
IF Files = "FILES" THEN Files = Name
ELSE Files = Files Name
TOGGLEENTRY Index
END
END
Command = "Flashfind" Files Pattern
CALL SETCLIP('FILER_SEARCH',Pattern)
EXECANDWAIT Command
UPDATESOURCEDIR
PANEL ON
'HISTORY Searched for the pattern' Pattern